package com.idanchuang.support.etcache.pubsub;

import com.idanchuang.support.etcache.remote.RemoteKey;

/**
 * 缓存变更事件
 * @author yjy
 * Created at 2021/12/23 9:09 下午
 */
public class RemoteEvent {

    /**
     * 缓存名称
     */
    private final String cacheName;
    /**
     * RemoteKey对象的字节数据
     */
    private final RemoteKey remoteKey;

    public RemoteEvent(String cacheName, RemoteKey remoteKey) {
        this.cacheName = cacheName;
        this.remoteKey = remoteKey;
    }

    public String getCacheName() {
        return cacheName;
    }

    public RemoteKey getRemoteKey() {
        return remoteKey;
    }

    @Override
    public String toString() {
        return "RemoteEvent{" +
                "cacheName='" + cacheName + '\'' +
                ", remoteKey=" + remoteKey +
                '}';
    }
}
